package pluginMain;

import java.util.logging.Logger;

import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.java.JavaPlugin;

public class ResetWorld extends JavaPlugin {
	public final String PLUGIN_NAME = "Reset World";
	public final Logger CONSOLE_LOGGER = this.getLogger();

	public void LOGCONSOLE(String msg) {
		CONSOLE_LOGGER.info(msg);
	}

	@Override
	public boolean onCommand(CommandSender sender, Command cmd, String label,
			String[] args) {
		if (sender.isOp()) {
			if (args.length != 0) {
				if (getServer().getWorlds().contains(args[0])) {
					if (getServer().getWorld(args[0]).getPlayers().size() != 0) {
						sender.sendMessage("Can't rebuild world! There too many players in this world");
					} else {
					}
				}
			}
		}
		return true;

	}

	@Override
	public void onEnable() {
		LOGCONSOLE(PLUGIN_NAME + " has been started.");
	}

	@Override
	public void onDisable() {
		LOGCONSOLE(PLUGIN_NAME + " has been disabled.");
	}

}
